package demo1;

public class Test1 {
    public static void main(String[] args) {
        MyArraylist myArraylist = new MyArraylist(2) ;
        myArraylist.add(1);
        myArraylist.add(2);
        myArraylist.add(3);
        myArraylist.display();
        System.out.println();
        myArraylist.add(2, 4);
        myArraylist.display();

        myArraylist.remove(5);
        myArraylist.display();
        myArraylist.set(4,99);
        myArraylist.display();
    }
}
